package com.asohofrucol.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.asohofrucol.model.ProductPriority;

public interface ProductPriorityDao extends BasicSaveDao<ProductPriority, Long>{

    @Query("SELECT p FROM ProductPriority p WHERE p.ruat.id = :ruatId and p.status='1' ORDER BY p.position")// poner orden por orden 
    public List<ProductPriority> listByRuatId(@Param("ruatId") Long ruatId);
}
